<?php
/**
 * @var $recruits
 * @var $provinceList
 * @var $allJobCate
 */
$currentCityName = $this->request->getParam('cityName',false);
$currentProvinceName = $this->request->getParam('provinceName',false);
?>
<div class="mainJobs mainWith">
    <div class="breadCrumb">
        关键词：<span style="color: #ff4466"><?php echo $this->request->getParam('searchWord')?></span> - 招聘考试搜索结果
    </div>
    <div class="zpHeader clearFix" style="display: none;">
        <span class="zpHeaderIntro">教师招聘网</span>
        <form action="" method="post" id="zpForm" onsubmit="return false">
            <input type="text" placeholder="请输入标题关键词搜索">
            <button class="zpSearchBtn" type="button">搜索</button>
        </form>
    </div>
    <div class="schoolLocationList clearFix">
        <div class="zpInfoList clearFix">
            <div class="zpInfoListHeader">最新招聘信息</div>
            <?php foreach ($recruits as $item) {
                ?>
                <div class="zpDetail ">
                    <div class="zpDetailHeader clearFix">
                        <p><a href="/zp/<?php echo $item->id?>.html" title="<?php echo $item->title?>"><?php echo $item->title?></a></p>
                        <p class="zpPositionViewAndPublish">
                            <span class="zpInfoPublishDate">
                                <i class="fa fa-clock-o" aria-hidden="true"></i>
                                <?php echo explode(' ',$item->publish_date)[0]?>
                            </span>
                            <span class="zpInfoViewCount">
                                <i class="fa fa-eye" aria-hidden="true"></i>
                                <?php echo $item->view_count?>
                            </span>
                        </p>
                    </div>
                    <div class="zpDetailTag clearFix">
                        <?php if($item->position !== null){
                            ?>
                            <ul class="job">
                                <?php
                                $positions = explode('|',$item->position);
                                foreach ($positions as $value) {
                                    ?>
                                    <li>
                                        <a href="/zp/<?php echo $item->id?>.html#zhaoPin"><?php echo $value ?></a>
                                    </li>
                                    <?php
                                }
                                ?>
                            </ul>
                            <?php
                        } else {
                            ?>
                            <span style="color: #888888">暂无岗位说明</span>
                            <?php
                        }?>
                        <a href="/zp/<?php echo $item->id?>.html" class="checkDetail">查看详情</a>
                    </div>
                </div>
                <?php
            }?>
            <?php if($recruits->count() === 0){
                ?>
                <p style="font-size: 18px;text-align: center;margin: 30px 0 0 0;">暂无数据</p>
                <?php
            }?>
            <div class="page-wrapper">
                <!--分页代码-->
                <?php
                    echo $this->element('paginator', [  "url" => '/'.$this->request->url.'_' ]);
                ?>
            </div>
        </div>
    </div>
</div>